<?php
class ORMpz_task_event extends ORMBase {
  public function __construct() {
    parent::__construct('pz_task_event');
  }

  public function __toEpObject($myManager, $epObject, $object) {
    $epObject->track_id = isset($object->track_id) ? $object->track_id : '';
    $epObject->task_id = isset($object->task_id) ? $object->task_id : 0;
    $epObject->date = isset($object->date) ? $object->date : 0;
    $epObject->user_id = isset($object->user_id) ? $object->user_id : 0;
    $epObject->state_id = isset($object->state_id) ? $object->state_id : 0;
    $epObject->transition_id = isset($object->transition_id) ? $object->transition_id : 0;
    $epObject->message = isset($object->message) ? $object->message : '';
    $epObject->overdue = isset($object->overdue) ? $object->overdue : '';
    return $epObject;
  }

  public function __toObject($myManager, $epObject, $object) {
    $object->id = $epObject->oid;
    $object->track_id = $epObject->track_id;
    $object->task_id = $epObject->task_id;
    $object->date = $epObject->date;
    $object->user_id = $epObject->user_id;
    $object->state_id = $epObject->state_id;
    $object->transition_id = $epObject->transition_id;
    $object->message = $epObject->message;
    $object->overdue = $epObject->overdue;
    return $object;
  }
}
?>
